package com.lss.study.algorithm.niuke.T14;

import org.apache.commons.collections4.list.TreeList;

import java.util.Comparator;
import java.util.LinkedList;
import java.util.List;
import java.util.Scanner;

/**
 * 功能描述：
 *
 * @Date: 2022/2/19 18:21
 */
public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        while (sc.hasNext()) {
            int num = Integer.parseInt(sc.next());
            List<String> list = new LinkedList<>();
            for (int i = 0; i < num; i++) {
                list.add(sc.next());
            }
            list.sort((o1, o2) -> o1.compareTo(o2));
            list.forEach(item -> System.out.println(item));
        }
    }
}
